package com.traffic.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.traffic.mapper.PerHolidaysMapper;
import com.traffic.domain.PerHolidays;
import com.traffic.service.IPerHolidaysService;

/**
 * 节假日配置Service业务层处理
 * 
 * @author 郭世纪
 * @date 2024-12-08
 */
@Service
public class PerHolidaysServiceImpl implements IPerHolidaysService 
{
    @Autowired
    private PerHolidaysMapper perHolidaysMapper;

    /**
     * 查询节假日配置
     * 
     * @param id 节假日配置主键
     * @return 节假日配置
     */
    @Override
    public PerHolidays selectPerHolidaysById(Long id)
    {
        return perHolidaysMapper.selectPerHolidaysById(id);
    }

    /**
     * 查询节假日配置列表
     * 
     * @param perHolidays 节假日配置
     * @return 节假日配置
     */
    @Override
    public List<PerHolidays> selectPerHolidaysList(PerHolidays perHolidays)
    {
        return perHolidaysMapper.selectPerHolidaysList(perHolidays);
    }

    /**
     * 新增节假日配置
     * 
     * @param perHolidays 节假日配置
     * @return 结果
     */
    @Override
    public int insertPerHolidays(PerHolidays perHolidays)
    {
        return perHolidaysMapper.insertPerHolidays(perHolidays);
    }

    /**
     * 修改节假日配置
     * 
     * @param perHolidays 节假日配置
     * @return 结果
     */
    @Override
    public int updatePerHolidays(PerHolidays perHolidays)
    {
        perHolidays.setUpdateTime(DateUtils.getNowDate());
        return perHolidaysMapper.updatePerHolidays(perHolidays);
    }

    /**
     * 批量删除节假日配置
     * 
     * @param ids 需要删除的节假日配置主键
     * @return 结果
     */
    @Override
    public int deletePerHolidaysByIds(Long[] ids)
    {
        return perHolidaysMapper.deletePerHolidaysByIds(ids);
    }

    /**
     * 删除节假日配置信息
     * 
     * @param id 节假日配置主键
     * @return 结果
     */
    @Override
    public int deletePerHolidaysById(Long id)
    {
        return perHolidaysMapper.deletePerHolidaysById(id);
    }
}
